Data centers (DC) are more widely created by cloud service providers and enterprises. A load balance effect of a network architecture (Fabric) of a data center on network traffic directly affects user experience. A poor load balance affect refers to that congestion packet loss occurs when utilization of the Fabric is still low. In contrast, a desirable load balance effect refers to that congestion packet loss occurs when utilization of the Fabric is relatively high. There are two types of Fabric congestion packet loss. One type is that local load is unbalanced, for example, an equal-cost multi-path (ECMP) manner or a random load balance manner. Specifically, multiple large flows are mapped to one same link after hash, causing that aggregated traffic exceeds a capacity of a port and leading to congestion. For the other type, because switches separately perform load balancing, multiple switches at a same level may send multiple large flows to one same switch at another level, causing that downlink traffic are aggregated and causing congestion.
There are currently two methods for resolving the foregoing two types of congestion. In a first method, for each new flow, hash is performed by using a 10-tuple. One equal-cost link is selected from all equal-cost links according to a result of the hash, and an edge switch (edge switch) detects a large flow on each link. When traffic of a link on which a large flow exists exceeds a preset threshold, reporting is performed to inform a flow scheduler (flow scheduler). The flow scheduler linearly searches, according to links collected in real time, for all possible equal-cost links to which the large flow may be scheduled. When a first matched equal-cost link is found, the large flow is scheduled to the equal-cost link. In a second method, for each new flow, a first switch selects a link with smallest load for each new flow. A load status of a link may be obtained according to the following method: In an overlay network, the first switch encapsulates a congestion field (including a port number that is of the first switch and that corresponds to each link, and a congestion metric value of each link) into an overlay header of each packet. After the congestion field is sent to a second switch, the second switch stores the congestion field, and then feeds back an updated congestion field (including a port number that is of the first switch and that corresponds to each link, and an updated congestion metric value of each link) to the first switch by using a reverse packet. The first switch stores the updated congestion field in a table. In this way, the first switch can select an optimal link according to the updated congestion field.
In the foregoing first method, a large flow and a status of each link need to be reported in real time. Consequently, in a large-scale data center, a data flow is very large, a response is slow, and network utilization of the data center is not high. In the second method, an application scenario is limited. Consequently, network utilization of a data center is not high either.